/*
 * heapSort.cpp
 *
 *  Created on: Sep 9, 2012
 *      Author: jeffrey
 */


#include<iostream>
#include"../header/util.h"
#include"../structure/BinaryHeap.h"
using namespace std;
using namespace structure;
class HeapSort{
public:
	static void sort(int array[], int n){
		BinaryHeap heap(array,n);
		for(int i=0;i<n;i++)
			array[i]=heap.pop();
	}
};

//int main(){
//	int array[] = { -90,1,2,-3,3,3,4,24,-5,5,5,6,68,6,10,10,10};
//	HeapSort::sort(array,sizeof(array)/sizeof(int));
//	UtilFunc::printArray(array,sizeof(array)/sizeof(int));
//}
